package org.example.model;

import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Controller;
import org.springframework.stereotype.Repository;
import org.springframework.stereotype.Service;

//以下四个注解，都是类注解，用于注册Bean对象
//注册的方式，默认的Bean ID(名称)，是类名首字母小写
@Controller
//@Service
//@Repository
//@Component
@Scope("prototype")
public class Bean对象1 {

    public  void sayHello(){
        System.out.println("Hello");
    }
}

